package sdc.media.motorbike;

import sdc.media.motorbike.Controller.Assets;
import sdc.media.motorbike.Controller.Setting;
import sdc.media.motorbike.View.ManagerScreen;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;

public class MotorBike extends Game {

	private static ManagerScreen manager;
	
	@Override
	public void create() {
		manager = new ManagerScreen();
		if(!Assets.isload)
			Assets.load();
		Setting.load();
		MotorBike.getManagerScreen().createScreen(ManagerScreen.SCREEN_MENU);
		Gdx.input.setCatchBackKey(true);
	}

	@Override
	public void dispose() {
		super.dispose();
	}

	@Override
	public void pause() {
		super.pause();
	}

	@Override
	public void resume() {
		super.resume();
	}

	@Override
	public void render() {
		if (manager.getScreen() != null)
			manager.getScreen().render(Gdx.graphics.getDeltaTime());
	}

	@Override
	public void resize(int width, int height) {
		super.resize(width, height);
	}

	@Override
	public void setScreen(Screen screen) {
		super.setScreen(screen);
	}

	@Override
	public Screen getScreen() {
		return super.getScreen();
	}

	public static ManagerScreen getManagerScreen() {
		return manager;
	}
}
